package com.beta.service;

import com.baomidou.framework.service.ISuperService;
import com.baomidou.mybatisplus.plugins.Page;
import com.beta.dto.order.OrderSearchDto;
import com.beta.entity.Orders;
import com.beta.dto.admin.OrderDetailDto;
import com.beta.dto.order.BackendOrderDto;
import com.beta.dto.order.OrderStatusCountDto;
import com.beta.dto.order.OrdersDto;

import java.util.Date;
import java.util.List;


/**
 * Orders 表数据服务层接口
 */
public interface IOrdersService extends ISuperService<Orders> {

    Orders validateOrder(Integer orderId);

    OrdersDto getOrder(Integer orderId);

    Page<OrdersDto> getOrders(Integer userId, Page<OrdersDto> page);

    Page<OrdersDto> getUnpaidOrders(Integer userId, Page<OrdersDto> page);

    Page<OrdersDto> getDeliveringOrders(Integer userId, Page<OrdersDto> page);

    Page<OrdersDto> getCompleteOrders(Integer userId, Page<OrdersDto> page);

    OrderStatusCountDto getOrdersStatusCount(Integer userId);

    Boolean canPay(Integer orderId);

    List<Orders> getPickedButNotReceiptOrders(Date beforePickedDate);

    Page<BackendOrderDto> getBackendOrders(Page<BackendOrderDto>page, OrderSearchDto orderSearchDto);

    OrderDetailDto getOrderDetail(Integer orderId);

}